package com.cskaoyan.controller.wx_catalog;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.wx_category.WxCategoryIndexVO;
import com.cskaoyan.bean.wx_category.WxCategoryVO;
import com.cskaoyan.service.wx_catalog.WxCatalogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: enhui
 **/
@RestController
@RequestMapping("wx/catalog")
public class WxCatalogController {
    @Autowired
    WxCatalogService wxCatalogService;

    @RequestMapping("index")
    public BaseRespVo catalogIndex() {
        WxCategoryIndexVO wxCategoryVO = wxCatalogService.catalogIndex();
        return BaseRespVo.ok(wxCategoryVO);
    }

    @RequestMapping("current")
    public BaseRespVo currentCatalog(Integer id) {
        WxCategoryVO wxCategoryVO = wxCatalogService.currentCatalog(id);
        return BaseRespVo.ok(wxCategoryVO);
    }
}
